Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adds Tests + Decouples parseAmount fn + fix BigNumber inital parse #20

Merged
merged 8 commits into from
Aug 8, 2024

Conversation

moraesjeremias
Copy link
Member

@moraesjeremias moraesjeremias commented Aug 7, 2024

Description

  • Decouples parseAmount fn
  • Fix BigNumber inital parse (toFixed instead of toString)
  • Add test cases using node.js assert and test suite API (AAA pattern).

Related Issue

https://github.com/availproject/helm-values/issues

Motivation and Context

parseAmount fn can't handle scientific notated numbers, therefore it throws an error and returns an empty string.
Must guarantee that all BigNumbers previously parsed will be strings not on scientific notation.
As per BigNumber.js docs it's recommended toFixed instead of toString to avoid scientific notation.

How Has This Been Tested?

Github Actions Run #Test 2

Screenshots (if appropriate)

@0xSasaPrsic 0xSasaPrsic merged commit 3c631f2 into main Aug 8, 2024
1 check passed
@0xSasaPrsic 0xSasaPrsic deleted the feat/add-tests branch August 8, 2024 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants